%线性平滑滤波
Fxy=[0 20 40 70
    80 100 120 150
    160 180 200 230];
uint8Fxy=uint8(Fxy);
subplot(2,2,1),imshow(uint8Fxy),xlabel("原始图像");
subplot(2,2,2),imhist(uint8Fxy),axis([0,255,0,1]),xlabel("原始图像的直方图","position",[120,-0.23]);

%平滑操作，模糊，去噪
Gxy=filter2(fspecial("average",3),uint8Fxy);
uint8Gxy=uint8(Gxy);
subplot(2,2,3),imshow(uint8Gxy),xlabel("均值滤波后的图像");
subplot(2,2,4),imhist(uint8Gxy),axis([0,255,0,1]),xlabel("滤波后图像的直方图","position",[120,-0.23]);